﻿@page
@model CoreRp.Pages.admin.homeModel
@using Microsoft.AspNetCore.Http;
@{
    Layout = null;
}
<!DOCTYPE html>
<!--
This is a starter template page. Use this page to start your new project from
scratch. This page gets rid of all links and provides the needed markup only.
-->
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>CoreRp-@(ViewData["title"])</title>
    <!-- Tell the browser to be responsive to screen width -->
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
    <!-- Bootstrap 3.3.5 -->
    <link rel="stylesheet" href="../plugins/bootstrap/css/bootstrap.min.css">
    <!-- Font Awesome -->
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">
    <!-- Ionicons -->
    <link rel="stylesheet" href="https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css">
    <!-- Theme style -->
    <link rel="stylesheet" href="../plugins/adminLTE/css/AdminLTE.min.css">
    <!-- AdminLTE Skins. We have chosen the skin-blue for this starter
          page. However, you can choose any other skin. Make sure you
          apply the skin class to the body tag so the changes take effect.
    -->
    <link rel="stylesheet" href="../plugins/adminLTE/css/skins/skin-blue.min.css">
    <!-- Multi Tabs -->
    <link href="~/css/admin.css" rel="stylesheet" />

    <style type="text/css">
        body,
        body.full-height-layout .wrapper,
        html {
            height: 100%;
        }

        body.full-height-layout .content-wrapper { /*使用multitabs的wrapper*/
            height: calc(100% - 140px) /*减去网页header和footer的高度，AdminLTE的为140px*/
        }
    </style>

    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
    <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
    <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
    <![endif]-->
</head>
<body class="sidebar-mini fixed skin-blue">
    <div class="wrapper">

        <!-- Main Header -->
        <header class="main-header">

            <!-- Logo -->
            <a href="index2.html" class="logo">
                <!-- mini logo for sidebar mini 50x50 pixels -->
                <span class="logo-mini"><b>R</b>P</span>
                <!-- logo for regular state and mobile devices -->
                <span class="logo-lg"><b>Razor</b>Page</span>
            </a>

            <!-- Header Navbar -->
            <nav class="navbar navbar-static-top" role="navigation">
                <!-- Sidebar toggle button-->
                <a href="#" class="sidebar-toggle" data-toggle="offcanvas" role="button">
                    <span class="sr-only">切换菜单</span>
                </a>
                <!-- Navbar Right Menu -->
                <div class="navbar-custom-menu">
                </div>
            </nav>
        </header>
        <!-- Left side column. contains the logo and sidebar -->
        <aside class="main-sidebar">

            <!-- sidebar: style can be found in sidebar.less -->
            <section class="sidebar">

                <!-- Sidebar Menu -->
                <ul class="sidebar-menu">
                    <li class="header">欢迎您，@(Request.GetRealName())</li>
                    <!-- Optionally, you can add icons to the links -->
                    <li class="active">
                        <a class="multitabs" data-iframe="true" href="dashboard" data-type="main"><i class="fa fa-dashboard"></i> <span>系统状态</span></a>
                    </li>
                    @foreach (var m1 in Model.Menus)
                    {

                        <li class="treeview">
                            <a href="#">
                                <i class="fa fa-briefcase"></i> <span>@(m1.MENUNAME)</span>
                                <i class="fa fa-angle-left pull-right"></i>
                            </a>
                            <ul class="treeview-menu">
                                @foreach (var m2 in m1.Children)
                                {
                                    if (m2.Children == null || m2.Children.Count == 0)
                                    {
                                        <li><a class="multitabs" href="@(m2.MENUURL)" data-type="info"><i class="fa fa-angle-double-right"></i> @(m2.MENUNAME)</a></li>

                                    }
                                    else
                                    {
                                        <li class="treeview">
                                            <a href="#">
                                                <i class="fa fa-briefcase"></i><span>@(m2.MENUNAME)</span>
                                                <i class="fa fa-angle-left pull-right"></i>
                                            </a>
                                            <ul class="treeview-menu">
                                                @foreach (var m3 in m2.Children)
                                                {
                                                    <li><a class="multitabs" href="@(m3.MENUURL)" data-type="info"><i class="fa fa-angle-double-right"></i> @(m3.MENUNAME)</a></li>
                                                }
                                            </ul>
                                        </li>
                                    }
                                }
                            </ul>
                        </li>
                    }
                </ul>
                <!-- /.sidebar-menu -->
            </section>
            <!-- /.sidebar -->
        </aside>

        <!-- Content Wrapper. Contains page content -->
        <div id="content_wrapper" class="content-wrapper">

        </div>
        <!-- /.content-wrapper -->
        <!-- Main Footer -->
        <footer class="main-footer">
            <!-- To the right -->
            <div class="pull-right hidden-xs">
                Just love it
            </div>
            <!-- Default to the left -->
            <strong>Copyright &copy; 2021 <a href="#">ensleep</a>.</strong> All rights reserved.
        </footer>


    </div>
    <!-- ./wrapper -->
    <!-- REQUIRED JS SCRIPTS -->
    <!-- jQuery 2.2.0 -->
    <script src="../plugins/jQuery/jQuery-2.2.0.min.js"></script>
    <!-- Bootstrap 3.3.5 -->
    <script src="../plugins/bootstrap/js/bootstrap.min.js"></script>
    <!-- Slimscroll -->
    <script src="../plugins/slimScroll/jquery.slimscroll.min.js"></script>
    <!-- AdminLTE App -->
    <script src="../plugins/adminLTE/js/app.js?v=2"></script>
    <!-- Multi Tabs -->
    <script src="~/js/multitabs.js"></script>

    <!-- Optionally, you can add Slimscroll and FastClick plugins.
         Both of these plugins are recommended to enhance the
         user experience. Slimscroll is required when using the
         fixed layout. -->

    <script>
        var multitabs = $('#content_wrapper').multitabs({
            init: [
                {
                    type: 'main',                           //标签页的类型，有 main | info，缺省为 info
                    title: '系统状态',                         //标题（可选），没有则显示网址
                    content: '',                        //html内容，如果设定此值，下面的URL设定则无效
                    url: 'dashboard'                            //链接
                }
            ],    
            nav: {
                backgroundColor: '#f5f5f5',            //默认nav-bar 背景颜色
                class: '',                             //为nav添加class
                draggable: true,                       //nav tab 可拖动选项
                fixed: false,                          //固定标签头列表
                layout: 'default',                     //有两种模式，'default', 'classic'(所有隐藏tab都在下拉菜单里) 和 'simple'
                maxTabs: 15,                           //最多tab数量。（main和editor不计算在内) 当为1时，整个标签栏隐藏。main和editor分别只能有1个标签。
                maxTabTitleLength: 25,                 //tab标题的最大长度
                showCloseOnHover: true,                //当值为true，仅在鼠标悬浮时显示关闭按钮。false时一直显示
                style: 'nav-tabs',                     //可以为nav-tabs 或 nav-pills
            },
            iframe: true,
            language: {                                //语言配置
                nav: {
                    //title: '标签',                                  //默认的标签页名称
                    dropdown: '<i class="fa fa-bars"></i>',        //标签栏的下拉菜单名称
                    showActivedTab: '显示激活页',          //下拉菜单的显示激活页面
                    closeAllTabs: '关闭所有',                //下拉菜单的关闭所有页面
                    closeOtherTabs: '关闭其它',            //下拉菜单的关闭其他页面
                }
            }
        });
    </script>

</body>
</html>
